package main.model;

public class Entity extends Component implements Identifiable, Cloneable{

	private Identifier identifier;
	private String parent;
	private Boolean isMasterEntity;
	
	public Entity(String name, Diagram parent) {
		super(name);
		this.isMasterEntity = Boolean.FALSE;
	}
	
	@Override
	public boolean equals(Object obj) {
		return this.getName().equals(((Entity)obj).getName());
	}
	
	public Entity(){
		super();
		this.isMasterEntity = Boolean.FALSE;
	}

	public void setIdentifier(Identifier identifier) {
		this.identifier = identifier;
	}

	public Identifier getIdentifier() {
		return identifier;
	}
	
	@Override
	public Boolean isEntity(){
		return Boolean.TRUE;
	}
	
	public String getDiagramParent(){
		return this.parent;
	}
	
	public void setDiagramParent(String d){
		this.parent = d;
	}

	public Boolean isMasterEntity() {
		return isMasterEntity;
	}

	public void setIsMasterEntity(Boolean isMasterEntity) {
		this.isMasterEntity = isMasterEntity;
	}

}
